package com.ai.module.business.service.impl;

import com.ai.module.chat.common.base.ThreadLocalContext;
import com.ai.module.business.domain.entity.BannerRecordEntity;
import com.ai.module.business.enu.Source;
import com.ai.module.business.mapper.BannerRecordMapper;
import com.ai.module.business.service.BannerRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * @author: heJinQin
 * @create: 2024-02-29 23:37
 * @description:
 **/
@Service
public class BannerRecordServiceImpl extends ServiceImpl<BannerRecordMapper, BannerRecordEntity> implements BannerRecordService {
    @Override
    public void textCheck(String riskReason, String businessId, String originalContent, Source talk) {
        BannerRecordEntity bannerRecord = new BannerRecordEntity();
        bannerRecord.setRule(riskReason);
        bannerRecord.setBusinessId(businessId);
        bannerRecord.setOriginalRule(originalContent);
        bannerRecord.setBusinessContent(originalContent);
        bannerRecord.setUserId(ThreadLocalContext.getUserId());
        bannerRecord.setSource(talk);
       save(bannerRecord);

    }
}
